package com.woniuxy01;

import java.io.FileOutputStream;
import java.io.IOException;

public class Test03 {
    public static void main(String[] args)  {
        FileOutputStream fos = null;
        try{
            fos=new FileOutputStream("a.txt");
            fos.write("中文a字符".getBytes());
        }catch (Exception ex){
            ex.getMessage();
            System.out.println("处理异常");
        }finally {
            try {
                if (fos!=null) {
                    fos.close();
                }
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
